<html>
	<head>

        
        <title>报名系统</title>

		<#include "_head.html"/>


		<style>
			.table {
				table-layout: fixed;
				width: auto;
			}
			.table th, .table td {
				text-align: center;
				vertical-align: middle!important;
			}
			.main {
				margin-bottom: 200px;
			}
		</style>
		<script>
		</script>
	</head>
	<body background="assets/images/background.jpg">

		<#include "_mask.html" />

		<div class = "main container">
		    <div class = "row-fluid">
			    <div class="span12">
					<h1 align="center">队伍信息</h1>
					<#if msg??>
				        <div align = "center">
					        <div class="alert alert-warning" align="center" style="width: 20%;">
								<a href="#" class="close" data-dismiss="alert">
									&times;
								</a>
								<strong>${msg}</strong>
							</div>
						</div>
				    </#if>
					<table class = "table table-responsive table-stats table-bordered table-striped" align="center">
						<thead>
							<tr>
								<th>
								</th>
								<th>
									队员一
								</th>
								<th>
									队员二
								</th>
								<th>
									队员三
								</th>
							</tr>
						</thead>
							<tbody>
								<tr>
								<td>
									姓名
								</td>
								<td>
									${team.name1!}
								</td>
								<td>
									${team.name2!}
								</td>
								<td>
									${team.name3!}
								</td>
							</tr>
							<tr>
								<td>
									学号
								</td>
								<td>
									${team.stuId1!}
								</td>
								<td>
									${team.stuId2!}
								</td>
								<td>
									${team.stuId3!}
								</td>
							</tr>
							<tr>
								<td>
									学院
								</td>
								<td>
									${team.college1!}
								</td>
								<td>
									${team.college2!}
								</td>
								<td>
									${team.college3!}
								</td>
							</tr>
							<tr>
								<td>
									班级
								</td>
								<td>
									${team.class1!}
								</td>
								<td>
									${team.class2!}
								</td>
								<td>
									${team.class3!}
								</td>
							</tr>
							<tr>
								<td>
									性别
								</td>
								<td>
									<#if team.gender1??>
					            		<#if team.gender1 == "male">
					            			男
					            		<#else>
					            			女
					            		</#if>
					            	<#else>	
					            	</#if>
								</td>
								<td>
									<#if team.gender2??>
					            		<#if team.gender2 == "male">
					            			男
					            		<#else>
					            			女
					            		</#if>
					            	<#else>	
					            	</#if>
								</td>
								<td>
									<#if team.gender3??>
					            		<#if team.gender3 == "male">
					            			男
					            		<#else>
					            			女
					            		</#if>
					            	<#else>	
					            	</#if>
								</td>
							</tr>
							<tr>
								<td>
									联系方式
								</td>
								<td>
									${team.contact1!}
								</td>
								<td>
									${team.contact2!}
								</td>
								<td>
									${team.contact3!}
								</td>
							</tr>
								<tr>
									<td>
										中文队名
									</td>
									<td colspan="3">
										${team.teamNameChinese!}
									</td>
								</tr>
								<tr>
									<td>
										英文队名
									</td>
									<td colspan="3">
										${team.teamNameEnglish!}
									</td>
								</tr>
							<tr>
								<td>
									UID
								</td>
								<td colspan="3">
									${team.uid!}
								</td>
							</tr>
							<tr>
								<td>
									申请时间
								</td>
								<td colspan="3">
									${(team.ctime*1000)?number_to_datetime}
								</td>
							</tr>
							<tr>
								<td>
									修改时间
								</td>
								<td colspan="3">
									${(team.mtime*1000)?number_to_datetime}
								</td>
							</tr>
							<tr>
								<td>
									管理历史
								</td>
								<td colspan="3" style="text-align: left;">
										<p>
										${team.history!}
										</p>
								</td>
							</tr>
						</tbody>
						
					</table>
					<div align="center">
						<#if admin>
							<h3 align="center">管理</h3>
							<form action="admin/update/${tid}" method="post">
								<div align="center">
									<span style="margin-top: 10px; margin-right: 20px;">
										<input type="radio" name="status" value="0" <#if team.status == 0> checked</#if> />
										<p class="btn btn-info" style="width: 60px;">Pending</p>
									</span>
									<span style="margin-top: 10px; margin-right: 20px;">
										<input type="radio" name="status"  value="1" <#if team.status == 1> checked</#if> />
										<p class="btn btn-success" style="width: 60px;">Accepted</p>
									</span>
									<span style="margin-top: 10px;">
										<input type="radio" name="status" value="2" <#if team.status == 2> checked</#if> />
										<p class="btn btn-danger" style="width: 60px;">Rejected</p>
									</span>
									
								</div>
								
								<h4>
									评论
								</h4>
								<textarea rows="4" cols="65" name="comment" style="text-align: left; width: auto;">${team.comment!}</textarea>
								<div>
									<input type="submit" value="提交" class = "btn btn-info">
									<a href = "admin/modify/${team.tid}" class = "btn btn-warning">修改报名信息</a>
									<a href = "contest/show/${team.cid}" class = "btn btn-danger">返回</a>
								</div>
								
							</form>
						<#else>
							<h3 align="center">状态</h3>
							<#if team.status == 0>
								<p class="btn btn-info" style="width: 60px;">Pending</p>
							</#if>
							<#if team.status == 1>
								<p class="btn btn-success" style="width: 60px;">Accepted</p>
							</#if>
							<#if team.status == 2>
								<p class="btn btn-danger" style="width: 60px;">Rejected</p>
							</#if>
							<h4>
								评论
							</h4>
							<div align = "center" >
							    <div class="alert alert-warning" align="center" style="width: 40%; min-height: 20px;">
									<strong>${team.comment!}</strong>
								</div>
							</div>
							<div>
								<#if .now?long < (contest.startTime - 24*60*60) *1000  >
									<a href = "contest/modify/${team.tid}" class = "btn btn-warning">修改报名信息</a>
								</#if>
								<a href = "contest/show/${team.cid}" class = "btn btn-danger">返回</a>
							</div>
						</#if>
					</div>
				</div>
			</div>
		</div>
		<#include "_modal.html"/>
	</body>
</html>

